﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AirManager.Entities
{
    public class Fleet
    {
        public virtual int Id { get; set; }
        public virtual string Nome { get; set;}
        private IList<Fix> fixes { get; set; }
        private IList<Pilot> pilots { get; set;}

        public virtual IList<Fix> Fixes
        {
            get { return fixes ?? (fixes = new List<Fix>()); }
            set { fixes = value; }
        }

        public virtual IList<Pilot> Pilots
        {
            get { return pilots ?? (pilots = new List<Pilot>()); }
            set { pilots = value; }
        }

        
        public virtual void AddFix(Fix fix)
        {
            fix.Fleet = this;
            Fixes.Add(fix);
            
        }

        public virtual void AddPilot(Pilot pilot)
        {
            pilot.Fleets.Add(this);
            Pilots.Add(pilot);
        }

        public virtual int  Gasolinarestante (int gas)
        {
            int tanque = 90;
            tanque = tanque + gas;
            return tanque;

        }

    
 }
}
